package com.pig.live.common.utils.app;

import org.springframework.core.env.Environment;

/**
 * 获取应用配置的工具类
 *
 * @author gaojx
 * @since 2020/8/9
 */
public class AppConfigUtils {

    /**
     * 从上下文中获取环境信息
     */
    private static Environment environment = AppContextUtils.getApplicationContext().getEnvironment();

    /**
     * 根据key获取配置信息
     * @param key
     * @return
     */
    public static String getProperties(String key) {
        return environment.getProperty(key);
    }
}
